<template>
	<view class="body">
		<scroll-view :scroll-y="true" @scrolltolower="scrollBottom">
			<view class="personlist" v-for="(item,i) in Interaction">
				<comment-detail :data='item'></comment-detail>
			</view>
			<uni-load-more :status="scrollInfo.loading"></uni-load-more>
		</scroll-view>
	</view>
</template>

<script lang="ts" name="user" setup>
	import { GetInteractionInfo } from '../../apis/message'
	import { onMounted, ref, reactive } from 'vue'
	import CommentDetail from "../../components/CommentDetail/CommentDetail"

	let Interaction = ref()
	const scrollInfo = reactive({
		loading: "more",
	})
	onMounted(() => {
		GetInteractionData()
	})
	//获取互动信息
	const GetInteractionData = async () => {
		console.log('获取用户信息');
		try {
			const res = await GetInteractionInfo();
			Interaction.value = res.data
			console.log(Interaction.value);


		} catch (error) {
			// 错误处理逻辑
			console.error('An error occurred while executing Captcha function:', error);
		}
	}

	// function scrollBottom() {
	// 	console.log("滚动到底部!");
	// 	page.value = (parseInt(page.value) + 1).toString();
	// 	scrollInfo.loading = "loading";
	// }
</script>

<style lang="scss" scoped>

</style>